/**
 * 
 */
package com.google.code.cisx.wfe.model;

/**
 * State in a workflow is defined distribution of Tokens over Places.
 * 
 * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public enum State {

    /**
     * Default state; this is the intial state for any entity.
     */
    STATE_DEFAULT("Default"),

    /**
     * Stopped state.
     */
    STATE_STOPPED("Stopped"),

    /**
     * Enabled state. Implies that the Petri-net entity is ready to service
     * requests.
     */
    STATE_ENABLED("Enabled"),

    /**
     * Running state. Implies that the Petri-net entity is in middle of
     * servicing a request.
     */
    STATE_RUNNING("Running"),

    /**
     * Suspended state. Implies that the Petri-Net entity has started servicing
     * the request but the servicing is currently suspended.
     */
    STATE_SUSPENDED("Suspended"),

    /**
     * Disabled state; Applies only to Workflows. Implies that the workflow is
     * currently disabled and will not entertain processing of any {@link CaseImpl}
     * s.
     */
    STATE_DISABLED("Disabled"),

    /**
     * Completed state. Implies that the Petri-Net entity has completed its
     * processing.
     */
    STATE_COMPLETED("Completed"),

    /**
     * Applies to Task. Implies that the Petri-Net entity encountered an error
     * while servicing a request.
     */
    STATE_FAILED("Failed"),

    /**
     * Applies to Task.
     */
    STATE_IN_ERROR("in Error");

    private String state;

    /**
     * @param state
     */
    private State(String state) {
        this.state = state;
    }

    public String getState() {
        return this.state;
    }

}